package team.se.tms.enums;

import lombok.Getter;

/**
 * 结果信息和结果信息码枚举
 *
 * @author winkyle
 * @date 2018/11/15
 */
@Getter
public enum ResultEnum {
    /**
     * 未知错误
     */
    Error(-1,"未知错误"),
    /**
     * 操作成功
     */
    SUCCESS(0,"成功"),
    /**
     * 帐号不存在
     */
    ACCOUNT_NO_EXIST(1,"帐号不存在"),
    /**
     * 密码错误
     */
    PASSWORD_WRONG(2,"密码错误"),
    /**
     * 帐号被锁定
     */
    ACCOUNT_LOCKED(3,"帐号被锁定"),
    /**
     * 帐号被禁用
     */
    ACCOUNT_DISABLED(4,"帐号被禁用"),
    /**
     * 请求过于频繁
     */
    EXCESSIVE_ATTEMPTS(5,"请求过于频繁"),
    /**
     * 凭证过期
     */
    EXPIRED_CREDENTIALS(6,"未登录"),
    /**
     * 参数错误
     */
    PARAMETER_WRONG(7,"参数错误"),
    /**
     * 验证码错误
     */
    VERIFICATION_CODE_WRONG(8,"验证码错误"),
    /**
     * 写入错误
     */
    WRITE_WRONG(9,"写入错误"),
    /**
     * 文件类型错误
     */
    FILE_TYPE_WRONG(10,"文件类型错误"),
    /**
     * 目录不存在
     */
    DIRECTORY_NO_EXIST(11,"目录不存在"),
    /**
     * 修改失败
     */
    UPDATE_ERROR(12,"修改失败"),
    /**
     * 增加失败
     */
    INSERT_ERROR(13,"添加失败"),
    /**
     * 删除失败
     */
    DELETE_ERROR(14,"删除失败"),
    /**
     * 查询失败
     */
    SELECT_ERROR(15,"查询失败"),
    /*
    *上传文件失败
     */
    UPLOAD_ERROR(16,"上传流程文档失败");
    private int code;
    private String msg;
    ResultEnum(int code,String msg) {
        this.code = code;
        this.msg = msg;
    }
}
